package hp.com.dao;

import hp.com.entity.Users;

import java.sql.SQLException;
import java.util.concurrent.ExecutionException;

public interface UsersDAO {
    //用户注册
    int addUsers(Users users) throws Exception;

    // 用户登录
    boolean UsersById(Users users) throws Exception;

    // 根据用户手机号进行查询
    Users checkPhone(Users users)throws Exception;

    // 验证用户修改时手机号是否输入正确
    boolean checkOldPhone(Users users) throws Exception;

    // 验证手机号是否被其它用户注册
    boolean checkNewPhone(Users users) throws Exception;

    // 用户修改手机号
    int updateUserPhone(Users users)throws Exception;

    // 验证用户修改时邮箱是否输入正确
    boolean checkOldEmail(Users users) throws Exception;

    // 用户修改邮箱
    int updateUserEmail(Users users)throws Exception;

    // 验证用户修改时原密码是否输入正确
    boolean checkOldPwd(Users users) throws Exception;

    //通过ID完善用户对象属性
    Users getUserByID(int ID) throws Exception;

    // 通过id进行密码修改
    int updateUsersPwd(Users users)throws Exception;
    //检查手机号可用
    boolean checkPhoneValid(String phone) throws Exception;
}
